Release 10.1A: OpenEdge Development:
Progress 4GL Reference
&GLOBAL-DEFINE preprocessor directive
Globally defines a compile-time constant (preprocessor name).
Syntax
preprocessor-nameThe preprocessor name (compile-time constant) that you supply. Progress reserved keywords are allowed, but cannot be used in preprocessor expressions.
definitionA string of characters (or preprocessor references that evaluate to a string of characters) whose content the preprocessor substitutes for
Examplespreprocessor-nameduring compilation. If the definition is longer than one line, a tilde (~) at the end of the first line indicates continuation to the next line.In this example, the preprocessor name
MAX-EXPENSEis defined as the text string "5000":
Wherever the reference
{&MAX-EXPENSE}appears in the source code, the preprocessor substitutes the text string “5000". For example, the preprocessor changes this line of code:
to this line:
Notes
- You must place the &GLOBAL-DEFINE directive at the beginning of a line, preceded only by blanks, tab characters, or comments (
/*comment*/). The preprocessor trims all leading and trailing spaces fromdefinition.- The syntax of the &GLOBAL-DEFINE and &SCOPED-DEFINE directives are identical but these directives are used differently.
See also
{ } Preprocessor name reference, &SCOPED-DEFINE preprocessor directive, &UNDEFINE preprocessor directive, DEFINED preprocessor function
|
Copyright © 2005 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |